home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
arexx
/
zedrexx.lha
/
ZedREXX
/
REXX
/
zRegister.zrx
< prev
next >
Wrap
Text File
|
1994-08-22
|
5KB
|
185 lines
/* $VER: zregister.zrx 1.0 (03.08.94)
* Copyright (c) 1994 Reality Check, Inc.
* Written by David N. Junod
*
*/
OPTIONS RESULTS
SIGNAL ON HALT
/* For Demo Purposes... */
Info("S:",info.)
IF info.DiskState="WRITE_PROTECTED" THEN PersistVol="ENV"
ELSE PersistVol="S"
/* Application Data */
'zInterface zRegister PersistFile='||PersistVol||':ZedREXX.zdb'
'zImage Magnify Width=11 Height=9 Depth=1 Data="3E006300C180C180C18063003EC000E00060"'
'zImage ZrxIcon File="ZedREXX:icons/zedrexx.info"'
'zWindow Main Label "Register" Open Centered Horizontal CloseEvent ChildMaxHeight'
'zMenu Project'
'zObject Button Quit Label "&Quit" SelectEvent'
'zEndMenu'
'zGroup Vertical'
'zObject TextEntry Name Label "&Name:" MaxChars 64 NumColumns 32 Persist'
'zObject TextEntry Address1 Label "Address:" MaxChars 64 NumColumns 32 Persist'
'zObject TextEntry City Label "City:" MaxChars 64 NumColumns 32 Persist'
'zObject TextEntry State Label "State/Province:" MaxChars 2 NumColumns 3 Persist'
'zObject TextEntry Zip Label "Postal/Zip Code:" MaxChars 15 Persist'
'zObject TextEntry Country Label "Country:" MaxChars 20 Persist Value="USA"'
'zObject TextEntry DPhone Label "Day Phone:" MaxChars 20 Persist'
'zObject TextEntry EPhone Label "Eve.Phone:" MaxChars 20 Persist'
'zObject TextEntry Internet Label "Internet:" MaxChars 64 NumColumns 32 Persist'
'zObject TextEntry Bix Label "Bix:" MaxChars 64 NumColumns 32 Persist'
'zObject Line'
'zObject TextDisplay Status Fill'
'zEndGroup'
'zObject Line'
'zGroup Vertical ChildMaxWidth'
'zGroup Horizontal Justification=Center'
'zObject ButtonG IB1 Image=ZrxIcon ReadOnly NoBorder'
'zEndGroup'
'zGroup Vertical ChildMaxWidth Justification=Bottom'
'zObject Button Print Label="&Print" SelectEvent'
'zObject Line'
'zObject Button Exit Label="E&xit" SelectEvent'
'zEndGroup'
'zEndGroup'
'zEndWindow'
'zEndInterface'
CALL Initialize
/* Enter the event loop */
DO FOREVER
/* Wait for something to happen */
'zWaitForEvent stem.'
/* Do something with the event */
INTERPRET "zRC="RESULT"()"
END
Halt:
Quit_Select:
Exit_Select:
zRegister_Quit:
Main_Close:
Cancel_Select:
CALL Shutdown
EXIT
Initialize:
'zSetAttr Status Value="Fill in information & Print"'
/* Turn everything on */
'zDoMethod zRegister Activate'
RETURN
Shutdown:
'zDoMethod Main Save'
RETURN
/* Print button pressed */
Print_Select:
/* Show them that something is going on */
'zDoMethod zRegister Lock'
/* Get the fields from the window */
'zGetAttr Main Fields fields.'
/* Create the registration file */
outName="ram:register.txt"
IF OPEN(out,outName,write) THEN DO
ds=DateStamp()
PARSE VAR ds dow date time
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,date)
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"Reality Check, Inc.")
CALL WRITELN(out,"ZedREXX Registration")
CALL WRITELN(out,"5543 Edmondson Pike, #134")
CALL WRITELN(out,"Nashville, TN 37211")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"Enclosed is the required check or money order for 35 US dollars (plus")
CALL WRITELN(out,"shipping and handling according to the ReadMe file) made payable to")
CALL WRITELN(out,"Reality Check, Inc.")
CALL WRITELN(out,"")
CALL WRITELN(out,"My pertinent information is as follows.")
CALL WRITELN(out,"")
CALL WRITELN(out," NAME:" fields.name)
CALL WRITELN(out," ADDRESS:" fields.address1)
CALL WRITELN(out," ADDRESS:" fields.city"," fields.state fields.zip)
CALL WRITELN(out," COUNTRY:" fields.country)
CALL WRITELN(out," DAY TEL:" fields.dphone)
CALL WRITELN(out," EVE.TEL:" fields.ephone)
CALL WRITELN(out," INTERNET:" fields.internet)
CALL WRITELN(out," BIX:" fields.bix)
/* Get the machine configuration */
cnt=0
TmpFile=TmpFile("T:.config")
ADDRESS COMMAND "ShowConfig >"TmpFile
IF ((RC=0) & (OPEN(in,TmpFile,read))) THEN DO
DO WHILE EOF(in)=0
inStr=READLN(in)
IF cnt=0 THEN CALL WRITELN(out," CONFIG:")
WRITELN(out,inStr)
cnt=cnt+1
END
CLOSE(in)
DeleteFile(TmpFile)
END
IF (cnt=0) THEN DO
CALL WRITELN(out," WB VER:" GetVar("Workbench"))
CALL WRITELN(out," KICK VER:" GetVar("Kickstart"))
END
/* Finish out the letter */
CALL WRITELN(out,"")
CALL WRITELN(out,"Please rush me the complete ZedREXX package which includes; disk, printed")
CALL WRITELN(out,"manual, AmigaGuide manual and Amiga memorabilia (only available to the")
CALL WRITELN(out,"first 250 registrants).")
CALL WRITELN(out,"")
CALL WRITELN(out,"Sincerely,")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,"")
CALL WRITELN(out,fields.name)
/* Form feed */
CALL WRITECH(out,'C'x)
CALL CLOSE(out)
IF (OPEN(out,"PRT:",write) & OPEN(in,outName,read)) THEN DO
DO WHILE EOF(in)=0
inStr=READLN(in)
CALL WRITELN(out,inStr)
END
CLOSE(in)
END
/* Set the status line */
statMsg="Registration file in"
END
ELSE DO
statMsg="Couldn't write to file"
END
/* Set the status line */
'zSetAttr Status Value=' statMsg outName
/* Unlock the UI */
'zDoMethod zRegister Unlock'
RETURN 0